const CopyPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
    mode: 'development', // 注明生产环境下
    entry: './src/index.js', // 指定入口文件
    output: {
        filename: 'main.js', // 指定输出文件名
    },
    devServer: {},
    plugins: [
        new HtmlWebpackPlugin({
            template: './src/index.html', // 指定模板文件
        }),
        new CopyPlugin({
            patterns: [{ from: 'static', to: 'staticTest' }],
        })
    ]
}